package com.uneed.api.util;

import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;

public class pb
{
  private static MessageDigest a()
  {
    return a("MD5");
  }

  static MessageDigest a(String paramString)
  {
    try
    {
      MessageDigest localMessageDigest = MessageDigest.getInstance(paramString);
      return localMessageDigest;
    }
    catch (NoSuchAlgorithmException localNoSuchAlgorithmException)
    {
    throw new RuntimeException(localNoSuchAlgorithmException.getMessage());
    }
  }
  
  public static byte[] a(byte[] paramArrayOfByte)
  {
    return a().digest(paramArrayOfByte);
  }

  public static byte[] b(String paramString)
  {
    return a(paramString.getBytes());
  }

  public static String c(String paramString)
  {
    return new String(pa.a(b(paramString)));
  }
}